package com.somnus.androidkotlindemo

import android.app.Application

/**
 * Created by Somnus on 2018/7/2.
 * Applicaton单例化 kt
 */
class App : Application() {
    companion object {
        private var instace: Application? = null
        fun instance() = instace!!
    }

    override fun onCreate() {
        super.onCreate()
        instace = this
    }
}